#include<iostream>
#include<cmath>
#include<string>
using namespace std;
class Complex
{
private:
	double real; // 实部
	double imag; // 虚部
public:
	Complex(){ }
    void Set(double r, double i)
    {
        real=r;
        imag=i;
    }
	Complex(double r, double i):real(r),imag(i){ }
	// 友元函数，复数c1 + c2(二参数对象相加)
	friend Complex addCom(const Complex& c1, const Complex& c2)
    {
        Complex tmp(c1.real+c2.real,c1.imag+c2.imag);
        return tmp;
    }
	// 友元函数，输出类对象c的有关数据(c为参数对象)
	friend void outCom(const Complex& c)
    {
        cout<<"("<<c.real<<","<<c.imag<<")"<<endl;
    }
};
int main()
{
    int sreal,simag;
    cin>>sreal>>simag;
    Complex sta(sreal,simag);
    int N;
    cin>>N;
    while(N--)
    {
        char a;
        int bb,cc;
        cin>>a>>bb>>cc;
        Complex tm;
        switch(a)
        {
            case '+':
                tm.Set(bb,cc);
                sta=addCom(sta,tm);
                outCom(sta);
                break;
            case '-':
                tm.Set(-bb,-cc);
                sta=addCom(sta,tm);
                outCom(sta);
                break;
        }
    }
}